<!-- saved from url=(0014)about:internet -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>TraceCircle.mxml</title>
<link rel="stylesheet" type="text/css" href="../../../../../SourceStyles.css"/>
</head>

<body><pre><span class="MXMLProcessing_Instruction">&lt;?xml version="1.0" encoding="utf-8"?&gt;</span>
<span class="MXMLASDoc">&lt;!---</span><span class="MXMLASDoc"> 
A simple orange circle that is drawn on the surface.
A fade effect is provided in order to fade out the circle if required.
</span><span class="MXMLASDoc">--&gt;</span>
<span class="MXMLComponent_Tag">&lt;s:Ellipse</span><span class="MXMLDefault_Text"> xmlns:fx="</span><span class="MXMLString">http://ns.adobe.com/mxml/2009</span><span class="MXMLDefault_Text">" 
           xmlns:s="</span><span class="MXMLString">library://ns.adobe.com/flex/spark</span><span class="MXMLDefault_Text">" 
           xmlns:mx="</span><span class="MXMLString">library://ns.adobe.com/flex/mx</span><span class="MXMLDefault_Text">"
           width="</span><span class="MXMLString">20</span><span class="MXMLDefault_Text">" height="</span><span class="MXMLString">20</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">&gt;</span>
    
    <span class="MXMLSpecial_Tag">&lt;fx:Metadata&gt;</span>
        <span class="ActionScriptASDoc">/** Event dispatched when the circle faded out completely. */</span>
        <span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptMetadata">Event</span><span class="ActionScriptBracket/Brace">(</span> <span class="ActionScriptString">"traceFadeOut"</span><span class="ActionScriptOperator">,</span> <span class="ActionScriptDefault_Text">type</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptString">"com.sap.coe.surface.events.TraceEvent"</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptBracket/Brace">]</span>    
    <span class="MXMLSpecial_Tag">&lt;/fx:Metadata&gt;</span>
    
    <span class="MXMLSpecial_Tag">&lt;fx:Declarations&gt;</span>
        <span class="MXMLComment">&lt;!--</span><span class="MXMLComment"> Fade effect instance </span><span class="MXMLComment">--&gt;</span>
        <span class="MXMLComponent_Tag">&lt;mx:Fade</span><span class="MXMLDefault_Text"> id="</span><span class="MXMLString">fadeEffect</span><span class="MXMLDefault_Text">" target="</span><span class="MXMLString">{</span><span class="ActionScriptReserved">this</span><span class="MXMLString">}</span><span class="MXMLDefault_Text">" 
                 alphaFrom="</span><span class="MXMLString">1.0</span><span class="MXMLDefault_Text">" alphaTo="</span><span class="MXMLString">0.25</span><span class="MXMLDefault_Text">" 
                 effectEnd="</span><span class="ActionScriptDefault_Text">fadeEffect_effectEndHandler</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span><span class="ActionScriptBracket/Brace">)</span><span class="MXMLDefault_Text">" </span><span class="MXMLComponent_Tag">/&gt;</span>
    <span class="MXMLSpecial_Tag">&lt;/fx:Declarations&gt;</span>
    
    <span class="MXMLComment">&lt;!--</span><span class="MXMLComment"> solid orange fill </span><span class="MXMLComment">--&gt;</span>
    <span class="MXMLComponent_Tag">&lt;s:fill&gt;</span>
        <span class="MXMLComponent_Tag">&lt;s:SolidColor</span><span class="MXMLDefault_Text"> color="</span><span class="MXMLString">0xF0AB00</span><span class="MXMLDefault_Text">" </span><span class="MXMLComponent_Tag">/&gt;</span>
    <span class="MXMLComponent_Tag">&lt;/s:fill&gt;</span>

    <span class="MXMLSpecial_Tag">&lt;fx:Script&gt;</span>
        &lt;![CDATA[
            <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">sap</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">coe</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">surface</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">events</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">TraceEvent</span>;
            <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">mx</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">events</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">EffectEvent</span>;
            
            <span class="ActionScriptReserved">protected</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">fadeEffect_effectEndHandler</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span>:<span class="ActionScriptDefault_Text">EffectEvent</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span>
            <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptReserved">this</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">dispatchEvent</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">TraceEvent</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">TraceEvent</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">TRACE_FADE_OUT</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptBracket/Brace">)</span>;
            <span class="ActionScriptBracket/Brace">}</span>
            
            <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">startFadeEffect</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">duration</span> : <span class="ActionScriptDefault_Text">Number</span><span class="ActionScriptBracket/Brace">)</span> : <span class="ActionScriptReserved">void</span>
            <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptDefault_Text">fadeEffect</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">duration</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">duration</span>;
                <span class="ActionScriptDefault_Text">fadeEffect</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">play</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span>;
            <span class="ActionScriptBracket/Brace">}</span>
            
            <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">stopFadeEffect</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span> : <span class="ActionScriptReserved">void</span>
            <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptDefault_Text">fadeEffect</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">stop</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span>;
            <span class="ActionScriptBracket/Brace">}</span>
        <span class="ActionScriptBracket/Brace">]</span><span class="ActionScriptBracket/Brace">]</span><span class="ActionScriptOperator">&gt;</span>
    <span class="MXMLSpecial_Tag">&lt;/fx:Script&gt;</span>
<span class="MXMLComponent_Tag">&lt;/s:Ellipse&gt;</span></pre></body>
</html>
